<% @page_title = @article.title %>
<%= render :partial => 'articles/info_sidebar' %>
<div class="column first span-16">
  <%= breadcrumbs %>
  <%= render :partial => 'articles/article', :locals => { :listing => false } %>
  <div class="column span-7 reviews">
    <h3>Reviews</h3>
    <% if @article.reviews.count == 0 %>There are no reviews on this article.<% end %>
    <% @article.reviews.each do |review| %>
        <div class="review">
          <span class="byline">Reviewed <strong><%= date review.created_at %></strong>
          <br /> 
          by <%= link_to review.user.name, profile_url(review.user.login) %></span>
          <% if logged_in? and current_user.admin? %>
            <span class="delete"><%= link_to 'Delete', discipline_article_review_path(@discipline, @article, review), :method => :delete, :confirm => 'Are you sure you want to delete this review?' %></span>
          <% end %>
          <p class="review-body">
          <p class="review-component">
          <% unless review.novelty_comments.blank? or review.novelty_rating.blank? %>
          <strong>Novelty</strong> <% if review.novelty_rating %><small>(<%= review.novelty_rating %>/5)</small><% end %>
            <br />
            <%= white_list(simple_format(review.novelty_comments)) %>
          <% end %>
          </p>
          <p class="review-component">
          <% unless review.literature_review_comments.blank? or review.literature_review_comments.blank? %>
          <strong>Literature Review</strong> <% if review.literature_review_rating %><small>(<%= review.literature_review_rating %>/5)</small><% end %>
            <br />
            <%=white_list(simple_format(review.literature_review_comments)) %>
          <% end %>
          </p>
          <p class="review-component">
          <% unless review.thesis_and_argument_comments.blank? or review.thesis_and_argument_comments.blank? %>
          <strong>Thesis and Argument</strong> <% if review.thesis_and_argument_rating %><small>(<%= review.thesis_and_argument_rating %>/5)</small><% end %>
            <br />
            <%=white_list(simple_format(review.thesis_and_argument_comments)) %>
          <% end %>
          </p>
          <p class="review-component">
          <% unless review.findings_comments.blank? or review.findings_comments.blank? %>
          <strong>Findings</strong> <% if review.findings_rating %><small>(<%= review.findings_rating %>/5)</small><% end %>
            <br />
            <%=white_list(simple_format(review.findings_comments)) %>
          <% end %>
          </p>
          <p class="review-component">
          <% unless review.impression_comments.blank? or review.impression_comments.blank? %>
          <strong>Overall Impression</strong> <% if review.impression_rating %><small>(<%= review.impression_rating %>/5)</small><% end %>
            <br />
            <%=white_list(simple_format(review.impression_comments)) %>
          <% end %>
          </p>
          </p>
          <hr />
        </div>
    <% end %>
    </div>
  <div class="column prepend-1 span-7 last comments">
    <h3>Comments</h3>
    <% if @article.comments.count == 0 %>There are no comments on this article.<% end %>
    <% @article.comments.each do |comment| %>
        <div class="comment">
          <span class="byline">Replied <strong><%= date comment.created_at %></strong>
            <br />
            by <%= link_to comment.user.name, profile_url(comment.user.login) %></span>
          <% if logged_in? and current_user.admin? %>
            <span class="delete"><%= link_to 'Delete', discipline_article_article_comment_path(@discipline, @article, comment), :method => :delete, :confirm => 'Are you sure you want to delete this comment?' %></span>
          <% end %>
          <p class="comment-body"><%= white_list(simple_format(comment.body)) %></p>
          <hr />
        </div>
    <% end %>
    </div>
</div>


